import request from '@/config/axios'

export interface Orchard {
  id?: number,
  avatar?: string,
  name?: string,
  phone?: string,
  contacts?: string,
  city?: string,
  province?: string,
  area?: string,
  address?: string,
  code?: string,
  status?: number,
  categoryId?:number,
  categoryName?: string,
  remark?: string,
  wxAccount?:string
}

export const getPageList = (params) => {
  return request.get({ url: '/product/orchard/getOrchardPage', params })
}

export const getOrchardAll = () => {
  return request.get({ url: '/product/orchard/getAll' })
}

export const getDetail = (params) => {
  return request.get({ url: '/product/orchard/getDetailById', params })
}


export const addOrchard = (data: Orchard) => {
  return request.post({url: '/product/orchard/addOrchard', data})
}

export const editOrchard = (data: Orchard) => {
  return request.post({url: '/product/orchard/editOrchard', data})
}